package com.kate.order.mapper;

import com.kate.order.entity.Order;
import org.apache.ibatis.annotations.Param;

import java.util.Date;
import java.util.List;
import java.util.Map;

public interface OrderMapper {
    //1.按id查询订单信息，按id降序排序
    Order queryById(Integer orderId);

    //2.添加操作
    int save(Order order);

    //3.foreach批量添加
    int insertUserBatch(@Param("orderList") List<Order> orderList);

    //4.根据id更新订单
    int updateById(Order order);


    //5.根据id删除
    int deleteById(int id);

    //6.多参数查询
    List<Order> queryByUserIdOrCreateTime(@Param("uid") Integer uid, @Param("createTime") Date createTime);


    //7.map参数
    List<Order> queryByUserIdOrCreateTime2(Map<String,Object> param);


    //8.按指定的字段进行排序
    List<Order> queryBySomeColumn(String clsName);
}
